|
Foxit PDF SDK
|
Public 成员函数 | |
| def | TextSearchReplace (doc) |
| 构造函数。 更多... | |
| def | TextSearchReplace (other) |
| 拷贝构造函数。 更多... | |
| def | IsEmpty () |
| 检查当前对象是否为空。 更多... | |
| def | ReplaceNext (replace_text) |
| 用替换文本替换下一个文本。 更多... | |
| def | ReplacePrev (replace_text) |
| 用替换文本替换上一个文本。 更多... | |
| def | SetPattern (keywords, page_index, find_option) |
| 设置关键字和页面索引以进行搜索和替换。 更多... | |
| def | SetReplaceCallback (replace_callback) |
| 设置替换回调函数。 更多... | |
此类可用于搜索和替换文本。 在使用此模块中的任何类或方法之前,请确保 Foxit PDF SDK 已成功初始化 通过函数 FoxitPDFSDKPython2.Library.Initialize 使用包含 "AdvEdit" 模块的密钥。
| def FoxitPDFSDKPython2.TextSearchReplace.TextSearchReplace | ( | doc | ) |
构造函数。
| [in] | doc | 要搜索或替换的有效 PDF 文档对象。 目前,Foxit PDF SDK 不支持对动态 XFA 文档进行替换。 |
此构造函数用于构造文本搜索替换对象。
| def FoxitPDFSDKPython2.TextSearchReplace.TextSearchReplace | ( | other | ) |
拷贝构造函数。
| [in] | other | 另一个文本搜索替换对象。 |
| def FoxitPDFSDKPython2.TextSearchReplace.IsEmpty | ( | ) |
检查当前对象是否为空。
当前对象为空时,意味着当前对象无用。
| def FoxitPDFSDKPython2.TextSearchReplace.ReplaceNext | ( | replace_text | ) |
用替换文本替换下一个文本。
| [in] | replace_text | 要替换的文本。不应为空字符串。 |
| def FoxitPDFSDKPython2.TextSearchReplace.ReplacePrev | ( | replace_text | ) |
用替换文本替换上一个文本。
| [in] | replace_text | 要替换的文本。不应为空字符串。 |
| def FoxitPDFSDKPython2.TextSearchReplace.SetPattern | ( | keywords, | |
| page_index, | |||
| find_option | |||
| ) |
设置关键字和页面索引以进行搜索和替换。
| [in] | keywords | 要替换的文本内容。不应为空字符串。 |
| [in] | page_index | 将被搜索和替换的页面索引。有效范围:从 0 到 (count-1)。count 由 PDF 文档的函数 FoxitPDFSDKPython2.PDFDoc.GetPageCount 返回。 这仅用于 FoxitPDFSDKPython2.TextSearchReplace.ReplacePrev 和 FoxitPDFSDKPython2.TextSearchReplace.ReplaceNext 。 |
| [in] | find_option | 查找选项。应该是有效的查找选项对象。 |
| def FoxitPDFSDKPython2.TextSearchReplace.SetReplaceCallback | ( | replace_callback | ) |
设置替换回调函数。
| [in] | replace_callback | 用于替换的回调对象。这应该由用户实现, 可以为 null。如果为 null,表示找到的文本总是需要被替换。 |